import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code4 {
    //a尽可能大，b尽可能小，同时还得尽早
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();

        long[] good = new long[n];
        long[] bad = new long[n];

        for(int i=0;i<n;i++) good[i] = in.nextLong();
        for(int i=0;i<n;i++) bad[i] = in.nextLong();

        long Maxgood = -1;
        long MinBad = Integer.MAX_VALUE;

        long goods = 0;
        long bads = 0;
        int ret = 0;

        int left = 0;
        int right = 0;

        while(right < n) {
            //进窗口
            goods += good[right];
            bads += bad[right];
            //出窗口
            while(right-left+1 > k) {
                goods -= good[left];
                bads -= bad[left];
                left++;
            }
            //更新结果
            if(right-left+1 == k) {
                if(goods > Maxgood) {
                    ret = left;
                    Maxgood = goods;
                    MinBad = bads;
                } else if(goods == Maxgood && bads < MinBad){
                    ret = left;
                    Maxgood = goods;
                    MinBad = bads;
                }
            }

            right++;
        }
        System.out.println(ret+1);
    }
}